[ Mega Script
Archive ] [ Frequently
Asked Questions ] [ Animation
]
- What does the nph- on the front of
a file mean?
- What does the line print
"HTTP/1.0 200 OK\n"; do?
- How can I make this script work
with JPEGs?
- What can I do if my images appear
too fast?
- My images appear to skip or jump?
How do I fix it?
Short Answer:
It stands for non-parsed header file.
Long Answer:
The nph- portion of the filename
tells your server to not parse this file.
Therefore, it should, in theory, run slightly
faster as an animation script, since you are
interfacing directly with the client instead
of going through the server to the client.
That is the reason for the HTTP/1.0 200
OK line. This is a header response that
is normally sent by the server, but if the
server is not parsing your files, the script
will need to send this header line, as the
animation script does.
Short Answer:
A simple response header telling the
client everything is ok. Similar to other
things like 403 Not found, 501
Server Error, Etc.
Long Answer:
If you have the filename set to something
that begins with nph-,
then this header response is necessary in
order to tell the client that everything is
ok. If you choose to name your file something
other than a filename that begins with nph-,
you should simply comment this line out of
the perl script by putting a # sign
in the front of the line.
Simply make the following changes to the script:
What used to be:
@files = ("begin.gif","second.gif","third.gif","last.gif");
$con_type = "gif";
Should be replaced with:
@files = ("begin.jpg","second.jpg","third.jpg","last.jpg");
$con_type = "jpeg";
In other words, change the @files variable to
reflect the filenames of the jpg formatted images and
change the $con_type variable to 'jpeg'.
Simply add a sleep command in between each image
and it will delay it by a second. For most people,
they don't have this problem, since the network
accounts for enough lag, but if you have small
images, they may appear to skip or jump. To fix this,
add the line:
sleep 1;
inside the loop that looks like:
foreach $file (@files) {
}
It will probably work best if you put it at the
end of this loop.
Short Answer:
Download the new version. You probably are
using version 1.1 or lower. Get version 1.2
or higher.
Long Answer:
You can add the following lines to the
script directly after the variable
configuration box, and it will upgrade you to
version 1.2 from version 1.1. The fix made
the script not buffer the images, so they
appear smoother. Add the following to your
script:
select (STDOUT);
$| = 1;
If it still appears choppy it is probably
through the download, and that is as good as
you can get.
[ Mega
Script Archive ]
|